package com.gl.saasservice.repository;

import com.gl.saasservice.entity.DepartmentEnterpriseTagRef;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DepartmentEnterpriseTagRefRepository extends PagingAndSortingRepository<DepartmentEnterpriseTagRef, Long>, JpaSpecificationExecutor<DepartmentEnterpriseTagRef> {
    List<DepartmentEnterpriseTagRef> findByDepRefIdIn(List<Long> depRefId);

    List<DepartmentEnterpriseTagRef> findByDepRefId(Long depRefId);

    @Transactional
    void deleteByDepRefId(Long depRefId);
}
